<tr>
  <td>
    <%= link_to stage.name, [@project, stage] %>
    <%= resource_lock_icon stage %>
    <%= stage.is_template ? stage_template_icon : '' %>

    <% if DeployGroup.enabled? %>
      <br/>
      <%= stage.deploy_groups.pluck(:name).join(', ') %>
    <% end %>
  </td>

  <% if deploy = stage.last_deploy %>
    <td>
      <%= link_to deploy.short_reference, [@project, deploy], title: "#{deploy.reference} at #{deploy.updated_at.to_fs(:db)}" %>
      by
      <%= deploy.user.name %>
      <%= status_badge deploy.job.status %>
    </td>
  <% else %>
    <td>-</td>
  <% end %>

  <td align="right">
    <%= deploy_link @project, stage %>
  </td>
</tr>
